package com.bto.solar.work.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * <p>
 * 并网信息
 * </p>
 *
 * @author adrian
 * @since 2023-08-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("grid_connection")
@ApiModel(value = "GridConnection对象", description = "并网信息")
public class GridConnection implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单ID")
    @TableId(value = "order_id", type = IdType.INPUT)
    private String orderId;

    @ApiModelProperty("并网合闸时间")
    private Timestamp startTime;

    @ApiModelProperty("验收时间")
    private Timestamp checkAcceptTime;

    @ApiModelProperty("电厂交易编号（发电户号）")
    private String generatorNumber;

    @ApiModelProperty("原电表用户编号（选填）")
    private String orgEleclMeterUserNo;

    @ApiModelProperty("并网备注（选填）")
    private String annotation;

    @ApiModelProperty("电站发电量监控截图（发电三天）")
    private String monitor;

    @ApiModelProperty("南网云平台截图（选填）")
    private String cloudPlatform;

    @ApiModelProperty("购售电合同年限")
    @JsonFormat(pattern="yyyy")
    private Date contractPeriod;

    @ApiModelProperty("购售电地址是否一致(0：（否）不一致，1：（是）一致)")
    private Byte isConsistent;

    @ApiModelProperty("省")
    private String provinceCode;

    @ApiModelProperty("市")
    private String cityCode;

    @ApiModelProperty("区/县")
    private String areaCode;

    @ApiModelProperty("购售电详细地址")
    private String detailedAddress;

    @ApiModelProperty("购售电合同（PDF上传）")
    private String contract;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;
}
